introduce OptionString, (#1352)
* introduce OptionString,
a replacement for OptionCString. Formats and filters can be
manually converted, with the potential to eliminate c character
string usage.
OptionCString::get() usages can often use an implicit cast from
OptionString instead, although the usage of get() is still valid.
* more OptionCString -> OptionString conversion
* use custom conversion routines.
this introduces OptionString::toInt and OptionString::toDouble,
which enforce error checking on conversions.
* convert more formats to OptionString
* convert gdb to OptionString
* convert xcsv, unicsv to OptionString
* convert html, text to OptionString
* convert ozi to OptionString
* convert mtk to OptionString
* convert globalsat to OptionString
* convert exif to OptionString
* convert lowranceusr to OptionString
* convert igc to OptionString.
note the error checking on timeadj is now done by OptionString::toInt.
* prove igc timeadj works with ints.
* convert shape to OptionString
* convert garmin_gpi to OptionString
* consolidate integer/double parse routines.
* convert subrip to OptionString
* convert garmin_txt to OptionString
* enhance OptionString conversions.
overloads, as opposed to default parameters, allow tools to find differen usages.
improved OptionString error messages with module and argstring information.
* enhance argtype ...
to indicate integer base and if trailing data is allowed.
Use these fields to check and convert integer/doubles in Vecs, fataling on errors.
* allow trailng data with parse_distance, parse_speed.
and when necessary convert these from ARGTYPE_STRING to ARGTYPE_FLOAT.
* fix typo, update refs
* convert garmin to OptionString
* convert skytraq to OptionString
* Introduce OptionInt & OptionDouble.
These must be used with ARGTYPE_INT and ARGTYPE_FLOAT.
The data is checked and converted in Vecs, and the results may
be retrieved by the user.
* convert almost all ARGTYPE_INT to OptionInt.
* final conversion to OptionInt
* mark TODO done.
* correct include comments for greps sake.
* delete complete TODO comments.
* whitespace
* use consistent error messags regarding options.
i.e. "module(option): "
* delete unused Option method type
* use ARGTYPE_STRING if trailing data is allowed.
The GUI validator used with ARGTYPE_INT and ARGTYPE_FLOAT will
reject input with any trailing data.
The CLI, including Vecs::assign_option, keys off the Option subclass now,
not the ARGTYPE.
Note that OptionInt and OptionDouble still allow trailing data. If
trailing data is allowed with these classes we just pair these with
ARGTYPE_STRING which controls validation in the GUI.
* drive arg validation from Option classes.
* simplify use of isEmpty
delete unused macro
delete extraneous file
* non member operator== with parameters const QString& not a candidate,
parameters are of class OptionString.
87 files changed: